The present invention relates to a displayed-pattern processing method carried out by a graphic processor, and more particularly to a displayed-pattern picking method for picking commands indicative of a pattern to be displayed on a display screen, out of a list stored in a graphic data buffer.
Computer technology has hitherto been used to make a drawing including various patterns such as a design drawing. Accordingly, when such a drawing is made, graphic data indicative of each of unit patterns such as a straight line and a circular arc or a pattern group for forming a combination of unit patterns is applied to and stored in a graphic data buffer. Then, graphic data is read out from the graphic data buffer to display a pattern on a display screen. That is, a desired drawing can be made by inputting graphic data successively to the graphic data buffer, or by modifying graphic data stored in the graphic data buffer.
Graphic data includes a display color command indicative of the color of a displayed pattern or displayed pattern group and a geometrical form command indicative of the geometrical form of the displayed pattern or displayed pattern group. A plurality of graphic data each including the display color command and the geometrical form command are stored in the graphic data buffer in such a manner that the graphic data are arranged so as to form a list (hereinafter referred to as "display list"). The geometrical form command includes data indicative of the characteristic form of a pattern or pattern group (that is, one of a straight line, a circle, a triangle and others), and data indicative of coordinate values representative of the position of the pattern or pattern group in a virtual coordinate system.
As mentioned above, the display list is made in the graphic data buffer. However, it is not always required that a pattern indicated by all the graphic data on the display list is displayed on a display screen, but a pattern displayed on the display screen is determined by a window set in a virtual coordinate system which is formed in the graphic data buffer. That is, a pattern formed by graphic data within the window is displayed in a viewport which is set on the display screen. The window can be formed at a desired position in the virtual coordinate system and can have desired dimensions, and the viewport may be set all over the display screen or at a portion thereof.
The coordinate values of the graphic data within the window with respect to the virtual coordinate system are converted into coordinate values in the viewport with respect to a coordinate system set on the display screen, to convert the graphic data into image data for picture elements on the display screen, and the image data are stored in an image memory such as a frame memory. The image data are successively read out from the image memory, to be sent to a display device, and thus a pattern corresponding to graphic data within the window is displayed in the viewport on the display screen of the display device.
In some cases, it is required to modify a portion of a drawing in a period when the drawing is being made, or after the drawing has been made. In the above cases, that position on the display screen which indicates a pattern portion to be modified, is specified by a position mark such as a cursor, and graphic data indicative of the pattern portion specified by the position mark is picked out of the display list. The picked graphic data is subjected to processing for modification of pattern.
In a conventional graphic processor, graphic data within the window is read out from the graphic data buffer, to be converted into image data for displaying a pattern. That is, the read-out graphic data is not preserved. Accordingly, in order to pick graphic data corresponding to the position mark, it is required to read out graphic data successively from the display list in the graphic data buffer and to judge whether or not the graphic data is within a pattern pick region (namely, pick aperture) specified by the position mark. Thus, the amount of processing necessary for picking desired graphic data is greatly increased, and a long processing time is needed.
An example of a method of obtaining desired graphic data rapidly is disclosed in a Japanese patent application JP-A-No. 58-221,887. This method relates to an operation for picking graphic data within a window. In more detail, a minimum rectangular region including a pattern which corresponds to graphic data, is formed for each graphic data, and it is checked by a simple comparing operation whether or not at least a portion of the rectangular region intersects with the window, to pick graphic data roughly. Only the data corresponding to graphic data indicative of the rectangular region which intersects with the window is checked. This method is applicable to a pick aperture. According to this method, it is not required to check out all graphic data, and hence a desired pattern portion can be rapidly extracted.
In this method, however, it is required to calculate data indicative of a minimum rectangular region including a pattern due to each graphic data, and a memory for storing the calculated data is required. Further, the amount of processing necessary for extracting a desired pattern portion is reduced, as compared with a case where all graphic data are checked as to whether or not each graphic data indicates a picture element within a pick aperture. However, each of minimum rectangular regions specified by all graphic data is compared with the window, and hence it is impossible to reduce the amount of processing greatly.